<?php

/*
 * Edit by shengxin
 * Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
 */

namespace api\mall\task;
use think\facade\Db;

/**
 * 检测典藏任务是否完成
 *
 * @author PC
 */
class MassDigital extends TaskChecker{


    protected function check($task_data, $cfg):bool {
        return $cfg['task_req']<=$task_data;
    }
    
    protected function queryTaskData($user):int {
        $num = Db::name('digital_collect')->where('user_id',$user->id)->count();
        return $num;
    }
}
